Feature: Install languages

  @InstallLanguages1 @InstallLanguages
  Scenario: The app provides a dialog that enables instalation from languages when they are not installed
    When I select a language "English"
    Then I going to see an dialog with "Yes" and "No" options
    Then I take a picture
    Then I select "No" on dialog
    Then I select a language "French"
    Then I going to see an dialog with "Yes" and "No" options
    Then I take a picture
    Then I select "No" on dialog
    Then I select a language "Portuguese"
    Then I going to see an dialog with "Yes" and "No" options
    Then I take a picture
    Then I select "No" on dialog
    Then I select a language "Dutch"
    Then I going to see an dialog with "Yes" and "No" options
    Then I take a picture
    Then I select "No" on dialog

  @InstallLanguages2 @InstallLanguages
  Scenario: The user cancels a language installation
    When I wait to see "French"
    Then I select a language "French"
    Then I wait to see "Yes"
    Then I going to see an dialog with "Yes" and "No" options
    Then I select "Yes" on dialog
    Then I select "Cancel" on dialog
    Then I take a picture

  @InstallLanguages3 @InstallLanguages
  Scenario: The user install a language
    When I save the database from the app
    Then I wait to see "French"
    Then I select a language "French"
    Then I going to see an dialog with "Yes" and "No" options
    Then I select "Yes" on dialog
    Then I wait to see "French"
    Then I wait for progress
    Then I select a language "French"
    Then I take a picture
    Then I restore the database from the app

  @InstallLanguages4 @InstallLanguages
  Scenario: The device don't have enough space to install a language
    When I generate a file that big enough to fill the folder "/sdcard/dummydata/" called "dummydata.txt"
    Then I wait to see "Portuguese"
    Then I select a language "Portuguese"
    Then I going to see an dialog that informs that is requires more space
    Then I take a picture
    Then I select "OK" on dialog
    Then I will clean the folder
